#ifndef __CK_DATA_PRODUCT_MANAGER_H__
#define __CK_DATA_PRODUCT_MANAGER_H__

#include "zCore.h"
#include <vector>
#include "ckDataProduct.h"

namespace ck
{
	class Connection;
	class DataProductInfo;
	namespace data
	{
		class Schema;
	}
	
	class ZCORE_API DataProductManager
	{
	protected:
		DataProductManager();
		virtual ~DataProductManager();

	public:
		static DataProductManager*	GetInstance();

	public:
		RESULTCODE		Load();
		void			SetConnection(Connection* pConnection);
	public:
		RESULTCODE		Initialize();

	public:

		z_uint32		GetCount();
		DataProductInfo*	GetDataProduct(z_uint32 i);
		data::Schema*	GetSchema(z_uint32 i);
		data::Schema*	GetSchema(ckDataProductType type);

	private:
		Connection*	m_pConnection;
		std::vector<DataProductInfo*>	m_products;
		std::vector<data::Schema*>		m_schemas;
	};
}

#endif //__CK_DATA_PRODUCT_MANAGER_H__
